home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / zgelsd.z / zgelsd
Encoding:
Text File  |  2002-10-03  |  7.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ZZZZGGGGEEEELLLLSSSSDDDD((((3333SSSS))))                                                          ZZZZGGGGEEEELLLLSSSSDDDD((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ZGELSD - compute the minimum-norm solution to a real linear least squares
  10.      problem
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK,
  14.                         LWORK, RWORK, IWORK, INFO )
  15.  
  16.          INTEGER        INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
  17.  
  18.          DOUBLE         PRECISION RCOND
  19.  
  20.          INTEGER        IWORK( * )
  21.  
  22.          DOUBLE         PRECISION RWORK( * ), S( * )
  23.  
  24.          COMPLEX*16     A( LDA, * ), B( LDB, * ), WORK( * )
  25.  
  26. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  27.      These routines are part of the SCSL Scientific Library and can be loaded
  28.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  29.      directs the linker to use the multi-processor version of the library.
  30.  
  31.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  32.      4 bytes (32 bits). Another version of SCSL is available in which integers
  33.      are 8 bytes (64 bits).  This version allows the user access to larger
  34.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  35.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  36.      only one of the two versions; 4-byte integer and 8-byte integer library
  37.      calls cannot be mixed.
  38.  
  39. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  40.      ZGELSD computes the minimum-norm solution to a real linear least squares
  41.      problem:     minimize 2-norm(| b - A*x |)
  42.      using the singular value decomposition (SVD) of A. A is an M-by-N matrix
  43.      which may be rank-deficient.
  44.  
  45.      Several right hand side vectors b and solution vectors x can be handled
  46.      in a single call; they are stored as the columns of the M-by-NRHS right
  47.      hand side matrix B and the N-by-NRHS solution matrix X.
  48.  
  49.      The problem is solved in three steps:
  50.      (1) Reduce the coefficient matrix A to bidiagonal form with
  51.          Householder tranformations, reducing the original problem
  52.          into a "bidiagonal least squares problem" (BLS)
  53.      (2) Solve the BLS using a divide and conquer approach.
  54.      (3) Apply back all the Householder tranformations to solve
  55.          the original least squares problem.
  56.  
  57.      The effective rank of A is determined by treating as zero those singular
  58.      values which are less than RCOND times the largest singular value.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZZZZGGGGEEEELLLLSSSSDDDD((((3333SSSS))))                                                          ZZZZGGGGEEEELLLLSSSSDDDD((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      The divide and conquer algorithm makes very mild assumptions about
  75.      floating point arithmetic. It will work on machines with a guard digit in
  76.      add/subtract, or on those binary machines without guard digits which
  77.      subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
  78.      conceivably fail on hexadecimal or decimal machines without guard digits,
  79.      but we know of none.
  80.  
  81.  
  82. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  83.      M       (input) INTEGER
  84.              The number of rows of the matrix A. M >= 0.
  85.  
  86.      N       (input) INTEGER
  87.              The number of columns of the matrix A. N >= 0.
  88.  
  89.      NRHS    (input) INTEGER
  90.              The number of right hand sides, i.e., the number of columns of
  91.              the matrices B and X. NRHS >= 0.
  92.  
  93.      A       (input) COMPLEX*16 array, dimension (LDA,N)
  94.              On entry, the M-by-N matrix A.  On exit, A has been destroyed.
  95.  
  96.      LDA     (input) INTEGER
  97.              The leading dimension of the array A. LDA >= max(1,M).
  98.  
  99.      B       (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
  100.              On entry, the M-by-NRHS right hand side matrix B.  On exit, B is
  101.              overwritten by the N-by-NRHS solution matrix X.  If m >= n and
  102.              RANK = n, the residual sum-of-squares for the solution in the i-
  103.              th column is given by the sum of squares of elements n+1:m in
  104.              that column.
  105.  
  106.      LDB     (input) INTEGER
  107.              The leading dimension of the array B.  LDB >= max(1,M,N).
  108.  
  109.      S       (output) DOUBLE PRECISION array, dimension (min(M,N))
  110.              The singular values of A in decreasing order.  The condition
  111.              number of A in the 2-norm = S(1)/S(min(m,n)).
  112.  
  113.      RCOND   (input) DOUBLE PRECISION
  114.              RCOND is used to determine the effective rank of A.  Singular
  115.              values S(i) <= RCOND*S(1) are treated as zero.  If RCOND < 0,
  116.              machine precision is used instead.
  117.  
  118.      RANK    (output) INTEGER
  119.              The effective rank of A, i.e., the number of singular values
  120.              which are greater than RCOND*S(1).
  121.  
  122.      WORK    (workspace/output) COMPLEX*16 array, dimension (LWORK)
  123.              On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ZZZZGGGGEEEELLLLSSSSDDDD((((3333SSSS))))                                                          ZZZZGGGGEEEELLLLSSSSDDDD((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      LWORK   (input) INTEGER
  141.              The dimension of the array WORK. LWORK must be at least 1.  The
  142.              exact minimum amount of workspace needed depends on M, N and
  143.              NRHS. As long as LWORK is at least 2 * N + N * NRHS if M is
  144.              greater than or equal to N or 2 * M + M * NRHS if M is less than
  145.              N, the code will execute correctly.  For good performance, LWORK
  146.              should generally be larger.
  147.  
  148.              If LWORK = -1, then a workspace query is assumed; the routine
  149.              only calculates the optimal size of the WORK array, returns this
  150.              value as the first entry of the WORK array, and no error message
  151.              related to LWORK is issued by XERBLA.
  152.  
  153.      RWORK   (workspace) DOUBLE PRECISION array, dimension at least
  154.              10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS + (SMLSIZ+1)**2 if M
  155.              is greater than or equal to N or 10*M + 2*M*SMLSIZ + 8*M*NLVL +
  156.              3*SMLSIZ*NRHS + (SMLSIZ+1)**2 if M is less than N, the code will
  157.              execute correctly.  SMLSIZ is returned by ILAENV and is equal to
  158.              the maximum size of the subproblems at the bottom of the
  159.              computation tree (usually about 25), and NLVL = MAX( 0, INT(
  160.              LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
  161.  
  162.      IWORK   (workspace) INTEGER array, dimension (LIWORK)
  163.              LIWORK >= 3 * MINMN * NLVL + 11 * MINMN, where MINMN = MIN( M,N
  164.              ).
  165.  
  166.      INFO    (output) INTEGER
  167.              = 0: successful exit
  168.              < 0: if INFO = -i, the i-th argument had an illegal value.
  169.              > 0:  the algorithm for computing the SVD failed to converge; if
  170.              INFO = i, i off-diagonal elements of an intermediate bidiagonal
  171.              form did not converge to zero.
  172.  
  173. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  174.      Based on contributions by
  175.         Ming Gu and Ren-Cang Li, Computer Science Division, University of
  176.           California at Berkeley, USA
  177.         Osni Marques, LBNL/NERSC, USA
  178.  
  179.  
  180. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  181.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  182.  
  183.      This man page is available only online.
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.